<template>
    <section>
        <!--工具条-->
        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
            <el-form :inline="true">
                <el-form-item>
                    <el-input placeholder="合同名称"></el-input>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" v-on:click="getContractList">查询</el-button>
                </el-form-item>
                <el-form-item>
                    <el-button type="primary" v-on:click="toSaveContract">新增</el-button>
                </el-form-item>
            </el-form>
        </el-col>

        <!--列表-->
        <el-table :data="contractList" highlight-current-row v-loading="listLoading" style="width: 100%;">

            <el-table-column prop="name" label="合同名称">
            </el-table-column>
            <el-table-column prop="code" label="合同编号">
            </el-table-column>
            <el-table-column prop="" label="结算状态">
                <template scope="scope">

                    <span v-text="getStatusName(scope.row.statusId)"></span>
                </template>
            </el-table-column>
            </el-table-column>
            <el-table-column label="操作" width="80">
                <template scope="scope">
                    <el-button size="small" @click="toSaveContract(scope.row)">编辑</el-button>

                </template>
            </el-table-column>
        </el-table>

        <!--工具条-->
        <el-col :span="24" class="toolbar">

            <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="20" :total="totalPage" style="float:right;">
            </el-pagination>
        </el-col>

        <el-dialog title="编辑" v-model="ShowSave" :close-on-click-modal="false">
            <contractInfo :contractId="contractId" v-on:saveContract="saveContract" v-on:exit="ShowSave=false"></contractInfo>
        </el-dialog>

    </section>
</template>
<script src="./contractList.js"></script>

<style lang="scss" scoped>

</style>